<?php 

class PHPPost{

	 
	 
	public static function send($url, $data = array(), $header =array() ){
		
		$header_array = array_merge($header,array('Content-Type: application/json'));
		$ch = curl_init($url);
		curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
		curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($ch, CURLOPT_HTTPHEADER,$header_array );

		//=============不检查SSL=================//
		curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
		curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
		 
		$result = curl_exec($ch);
		return $result;
		
	}
		
}
?>